#include "field.hpp"

using namespace std;
/* --------------------------------------------------------------- */
Field::Field(std::vector<int> def) {
	orderDefinition = def;
}
/* --------------------------------------------------------------- */
void Field::addUnavailable(int unav) {
	availables.remove(unav);
}
/* --------------------------------------------------------------- */
void Field::addAvailable(int av) {
	availables.add(av);
}
/* --------------------------------------------------------------- */
bool Field::setValue(int v) {
	if(availables.find(v) == availables.end())
		return false;
	value = v;
	addUnavailable(v);
	return true;
}
/* --------------------------------------------------------------- */
